import pytest
from utils.sendmethod import Send_Method
from utils.getkeyword import GetKeyWord
from utils.use_mysql import use_mysql

@pytest.fixture(autouse=True)
def token():
    url='http://47.108.206.100:8085/sso/login'
    payload={'password':123456,'username':'zdm2'}
    res=Send_Method.send_Method(method='post',url=url,data=payload)
    get_token=GetKeyWord.getKeyWord(res.json(),'token')
    get_tokenHead=GetKeyWord.getKeyWord(res.json(),'tokenHead')
    headers={'Authorization': get_tokenHead+get_token}
    return headers





